// 项目配置文件

let baseUrl = 'http://www.itcbc.com:8080'

$.ajaxPrefilter(function (option) {
    option.url = baseUrl + option.url;

    option.headers = {
        Authorization: localStorage.getItem('token')
    }
    option.complete = function (xhr) {
        let res = xhr.responseJSON;
        if (res && res.status == 1 && res.message == '身份认证失败!') {
            // 移除假的token或过期的token
            localStorage.removeItem('token')
            location.href = './login.html'

        }
    }
})